package com.auto.survey.activity.adjustment.adjustment_high.entity

import androidx.room.Entity
import androidx.room.ForeignKey
import androidx.room.Index
import androidx.room.PrimaryKey

// 已知点
@Entity(
    tableName = "known_points",
    foreignKeys = [
        ForeignKey(
            entity = Project::class,
            parentColumns = ["id"],
            childColumns = ["projectId"],
            onDelete = ForeignKey.CASCADE
        )
    ],
    indices = [Index("projectId")]
)
data class KnownPoint(
    @PrimaryKey(autoGenerate = true)
    val id: Int = 0,
    val projectId: Int,
    val know_point_name: String,
    val know_elevation: Double, // 已知点高程必须有值
    val know_std_dev: Double = 0.0 // 已知点中误差为0
)